<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<ww:bean name="'com.css.apps.base.dict.service.DictMan'" id="dictID" />
<ww:bean name="'com.css.msgcenter.admin.msglog.service.MsgLogService'" id="msgLogService" />
<form class="form-horizontal table-form" name="form1" id="form1" method="post" action="dirMsgTask.action"  onsubmit="return navTabSearch(this)">
    <input type="hidden" name="page.orderFlag" id="page.orderFlag" class="order-flag" value="<ww:property value='page.orderFlag'/>"> 
	<input type="hidden" name="page.orderString" id="page.orderString" class="order-string" value="<ww:property value='page.orderString'/>">
	<input type="hidden" name="page.pageSize" class="page-size" value="<ww:property value='page.pageSize'/>">
	<input type="hidden" name="page.totalPages" class="page-count" value="<ww:property value='page.totalPages'/>">
	<input type="hidden" name="page.currentPage" class="page-current" value="<ww:property value='page.currentPage'/>">
	
	<div class="table-header">
		<div class="table-search">
			<ul>
				<li><input class="input-medium" type="text" id="sender" name="sender" maxlength="50"  placeholder="请输入发送方" value="<ww:property value='sender'/>"></li>
				<li><input class="input-medium" type="text" id="receiver" name="receiver" maxlength="50"  placeholder="请输入接收方" value="<ww:property value='receiver'/>"></li>
				<li>消息类型：<ww:select attributes="class='input-small'" name="'msgType'" id="msgType" value="openFlag" list="#dictID.getDictListQuery('msg_d_msgtype')" listKey="code" listValue="name"></ww:select> </li>
			    <li>消息状态：<ww:select attributes="class='input-small'" name="'msgStatus'" id="msgStatus" value="msgStatus"  list="#dictID.getDictListQuery('msg_d_msgstatus')" listKey="code" listValue="name"></ww:select> </li>
				<li>发送方应用：<ww:select attributes="class='input-medium'" name="'openFlag'" id="openFlag" value="openFlag" list="#msgLogService.getSelect4App()" listKey="uuid" listValue="appName"></ww:select> </li>
			</ul>
			<ul>
				<li><input class="input-small Wdate" id="beginTime" name="beginTime" readonly="true" type="text" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}'})" value='<ww:property value="new java.text.SimpleDateFormat('yyyy-MM-dd').format(beginTime)"/>'> 
			    至 <input class="input-small Wdate" id="endTime" name="endTime" readonly="true" type="text" onclick="WdatePicker({minDate:'#F{$dp.$D(\'beginTime\')}'})" value='<ww:property value="new java.text.SimpleDateFormat('yyyy-MM-dd').format(endTime)"/>'></li>
			    <li><ww:button css="btn green" caption="查询" funcode="msgcenter_msglog/dirMsgTask" type="submit"></ww:button></li>
			</ul>
		</div>
		<div class="table-btn">
		</div>
	</div>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th width="50px">操作</th>
				<th width="80px" order-field="b.sender" class="order">发送方</th>
				<th width="80px" order-field="a.receiver_name" class="order">接收方</th>
				<th width="80px" order-field="a.msg_type" class="order">消息类型</th>
				<th width="100px" order-field="b.app_id" class="order">发送方应用</th>
				<th width="100px" order-field="a.create_time" class="order">创建时间</th>
				<th width="100px" order-field="a.begin_time" class="order">开始时间</th>
				<th width="100px" order-field="a.finish_time" class="order">完成时间</th>
				<th width="50px" order-field="a.fail_count" class="order">失败次数</th>
				<th width="50px" order-field="a.msg_status" class="order">消息状态</th>
			</tr>
		</thead>
		<tbody>
		  <ww:iterator value="page.results" id="data" status="data">
			<tr>
				<ww:set name="obj" value="page.results.get(#data.index)"/>
				<td class="text-center"><ww:link funcode="msgcenter_msglog/dirMsgTaskLog" caption="日志" title="日志" target="cssDialog"  rel="d1" href="dirMsgTaskLog.action?result=detail&page.pageSize=100&taskId=%{#obj[0]}" ></ww:link>&nbsp;</td>
				<td class="text-center"><ww:property value="#obj[1]"/></td>
				<td class="text-center"><ww:property value="#obj[2]"/></td>
				<td class="text-center"><ww:property value="#dictID.getDictType('msg_d_msgtype',#obj[3]).name"/></td>
				<td class="text-center"><ww:property value="#msgLogService.getAppName(#obj[4])"/></td>
				<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yy-MM-dd HH:mm').format(#obj[5])"/></td>
				<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yy-MM-dd HH:mm').format(#obj[6])"/></td>
				<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yy-MM-dd HH:mm').format(#obj[7])"/></td>
				<td class="text-center"><ww:property value="#obj[8]"/></td>
				<ww:set name="obj2" value="#dictID.getDictType('msg_d_msgstatus',#obj[9])"/>
				<td class="text-center"><span style="color:<ww:property value="#obj2.remark"/>;"><ww:property value="#obj2.name"/></span></td>
			</tr>
			</ww:iterator>
		</tbody>
	</table>
	<div class="pagination"> <ww:property value="page.pageSplit"/></div>
</form>

